<?php defined('BASEPATH') or exit('No direct script access allowed');

/**
 * Session Plugin
 *
 * Read and write session data
 *
 * @author  PyroCMS Dev Team
 * @package PyroCMS\Core\Plugins
 */
class Plugin_Button extends Plugin
{

	public $version = '1.0.0';
	public $name = array(
		'en' => 'Button',
	);
	public $description = array(
		'en' => 'Button edit, delete,add.',
		'el' => 'Πρόσβαση σε μεταβλητές που βρήσκονται σε URL, τμήματα URL και αλλού.',
            'fa' => 'دسترسی به متغییر ها و سگمت ها و موارد دیگری از URL',
		'fr' => 'Accéder aux informations sur une URL (URL courante, segments, ancres, etc.).',
		'it' => 'Accedi alle variabili URL, ai segmenti e molto altro'
	);

	/**
	 * Returns a PluginDoc array
	 *
	 * Refer to the Blog plugin for full documentation
	 *
	 * @return array
	 */
	public function _self_doc()
	{
		$info = array();

		return $info;
	}

	public function href()
	{
		$tag = $this->attribute('tag') == 'button' ? "button" : "a";
		$href = $this->attribute('href') ? " href= \"".$this->attribute('href')."\"" : "";
		$class = $this->attribute('class') ? " class= \"".$this->attribute('class')." action tooltips \"" : "";
		$title = $this->attribute('title');
		$data_title = $this->attribute('title') ? " data-original-title= \"".$this->attribute('title')."\"" : "";
		$data_toggle = $this->attribute('data-toggle') ? " data-toggle= \"".$this->attribute('data-toggle')."\"" : "";
		return "<$tag $href $class $data_title title = \"$title\" $data_toggle >$title</$tag>";
	}
}
